﻿<script type="text/javascript">
    $(document).ready(function () {
        $("#txtSearch").focus(function () {
            $(this).val("");
        });

        $(".selected_div_right").click(function () {
            $("ul.selected_div_left_bottom").css("display", "block");

        });

        $("ul.selected_div_left_bottom li").click(function () {
            var type = $(this).text();
            $("#hdUserSearchType").val(type);

            $("ul.selected_div_left_bottom").css("display", "none");
            $(".selected_div_left_top").text($(this).text());
        });



        $("#btnSearch").click(function () {
            if ($("#txtSearch").val() == "" || $("#txtSearch").val() == null || $("#txtSearch").val() == "昵称\\籍贯\\性别\\年龄") {
                return false;
            }
        });

    });
</script>
@using (Html.BeginForm("SearchUser", "User", FormMethod.Post))
{
    <div class="search_bar_box clearfix">
        <input id="txtSearch" type="text" name="txtSearch" value="昵称\籍贯\性别\年龄" class="text" />
        <div class="selected_div">
            <div class="selected_div_left">
                <div class="selected_div_left_top">
                    全部</div>
                <ul class="selected_div_left_bottom" style="display: none;">
                    <li>全部</li>
                    <li>昵称</li>
                    <li>籍贯</li>
                    <li>性别</li>
                    <li>年龄</li>
                </ul>
            </div>
            <div class="selected_div_right">
            </div>
        </div>
        @Html.Hidden("hdUserSearchType", null, new { id = "hdUserSearchType" })
        @*<input type="hidden" id="hdUserSearchType" name="hdUserSearchType" />*@
        <input type="submit" value="搜索" class="btn" id="btnSearch" />
    </div>
}